Skip to content

feat(rta): Context_Switch_Time folded into recurrence (v0.9.2)#198

Merged
avrabe merged 1 commit into
mainfrom
feat/v0.9.2-2b-context-switch
May 3, 2026
Merged

feat(rta): Context_Switch_Time folded into recurrence (v0.9.2)#198
avrabe merged 1 commit into
mainfrom
feat/v0.9.2-2b-context-switch

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented May 1, 2026

Tier A #5 partial — folds Context_Switch_Time into the RTA recurrence as 2·CS WCET inflation per Buttazzo §7. v0.8.x warned about CS being unset but didn't use it when set. New OverheadInflation Info diagnostic. Default unset = byte-identical. Lean recurrence theorem unchanged (caller-side inflation).

Test plan: 2 new tests (with-CS / without-CS); workspace tests pass; clippy/fmt/rivet clean.

🤖 Generated with Claude Code

@avrabe avrabe force-pushed the feat/v0.9.2-2b-context-switch branch from db068c2 to a2a41b1 Compare May 2, 2026 06:17
Tier A #5 from the post-v0.9.0 reviewer audit (partial — only
Context_Switch_Time; Interrupt_Overhead per ISR firing is the
companion follow-up). v0.8.x emitted a STPA-REQ-022 advisory if
Context_Switch_Time was unset, but never folded the value into
the Tindell-Clark / Joseph-Pandya recurrence when it WAS set —
silently optimistic.

Now: each thread's WCET is inflated by `2 × Context_Switch_Time`
(one preemption-in + one preemption-out per Buttazzo §7) before
entering the recurrence. The recurrence math itself
(`compute_response_time_jittered_blocking`) is unchanged, so the
existing Lean monotonicity / convergence proofs still hold. New
`OverheadInflation` Info diagnostic per thread when CS > 0.

Default unset = 0 → byte-identical to v0.8.x / v0.9.1.

REQ-RTA-008 + TEST-RTA-CONTEXT-SWITCH. 2 new RTA tests
(context_switch_inflates_wcet,
no_context_switch_byte_identical_to_v091).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@avrabe avrabe force-pushed the feat/v0.9.2-2b-context-switch branch from a2a41b1 to 70707a4 Compare May 2, 2026 14:27
@avrabe avrabe merged commit 6e9f5ab into main May 3, 2026
16 checks passed
@avrabe avrabe deleted the feat/v0.9.2-2b-context-switch branch May 3, 2026 05:30
@codecov
Copy link
Copy Markdown

codecov Bot commented May 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

avrabe added a commit that referenced this pull request May 3, 2026
Honesty + tightness pass. Closes 6 reviewer items + Lean spec align
+ org-wide CI concurrency control:

- α(0)=0 causality fix (#193) — discharges 5/5 → 4 sorrys in MinPlus
- Spar_TSN::Hi/Lo_Credit user-tunable CBS (#195) — Tier A #8
- WCTT sensitivity output (#196) — NC top-5 #13
- Stop_For_Lock + ARINC severity (#197) — Tier A #6 + #9
- Context_Switch in RTA recurrence (#198) — Tier A #5 (partial)
- RTA→WCTT release-jitter coupling (#199) — NC top-5 #4
- Nightly fuzz + bench workflow fixes (#194)
- Org-wide CI concurrency control (#200)

Workspace version 0.9.1 → 0.9.2.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
avrabe added a commit that referenced this pull request May 11, 2026
…ont.) (#209)

Folds Spar_Timing::Interrupt_Overhead into each ISR's effective WCET as
1x per firing — vector dispatch, ISR-context save/restore, EOI ack —
mirroring the 2x Context_Switch_Time inflation tasks pay per dispatch
(REQ-RTA-008 / PR #198). The ISR pays this kernel-resident interrupt
cost once per firing, not twice; default unset = 0 keeps RTA output
byte-identical to v0.9.2. Closes the Tier A #5 reviewer follow-up.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant